﻿@model Gfw.Web.Models.User.UserRegisterModel

@{
    ViewBag.Title = "注册新用户";
    Layout = "~/Views/Shared/_LayoutContent.cshtml";
}

<h5 style="color:Blue">温馨提示：注册新会员时，请预留560以上的D币，系统会自动扣除560给该注册会员。</h5>
@{
    if (Model != null)
    {
        using (Html.BeginForm("Register", "User"))
        {
    @Html.ValidationSummary(true)

    <h4>
        @Html.DisplayNameFor(model => model.Balance)
        @Html.DisplayFor(model => model.Balance)
    </h4>

    <div class="editor-label">
        @Html.LabelFor(model => model.LoginName)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.LoginName)
        @Html.ValidationMessageFor(model => model.LoginName)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Password)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Password)
        @Html.ValidationMessageFor(model => model.Password)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.ConfirmPassword)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.ConfirmPassword)
        @Html.ValidationMessageFor(model => model.ConfirmPassword)
    </div>
    
    <div class="editor-field">
        @Html.HiddenFor(model => model.Parentid)
        @Html.HiddenFor(model => model.CodeNumber)
        @Html.HiddenFor(model => model.ParentName)
        @Html.HiddenFor(model => model.Balance)
    </div>

    <p>
        <input type="submit" value="注册" onclick="this.disabled = true; this.form.submit();"/>
    </p>
        }

    <div>
        <a href="javascript:history.go(-1)">返回</a>
    </div>
    }
    else
    {
    <h2>该用户的父节点不存在或未激活，不允许注册，请选择其他节点。</h2>
    @Html.ActionLink("返回", "Index1", "UserGenealogy", new { type = "goback" }, null)
    }
}
